'use strict';

const mongoose = require('mongoose');
mongoose.Promise = require('bluebird');

let uri="mongodb://localhost:27017/abnormal";

mongoose.connect(uri);
mongoose.connection.on('error', function() {
  console.error('MongoDB Connection Error. Make sure MongoDB is running.');
  throw new Error('mongoStatusError');
});
mongoose.connection.once('open', function() {
  console.log('open mongodb success');
});
